<!--  -->
<template>
  <div
    class="login-container"
    :style="{
      backgroundImage:
        'url(' + require('@/assets/images/login_background2.png') + ')',
    }"
  >
    <div class="login-logo">
      <span />
    </div>

    <div class="login-content">
      <div class="login-content-main">
        <h4 class="login-content-title">后台模板</h4>
        <login-form />
      </div>
    </div>
  </div>
</template>

<script>
import {
  defineComponent,
  reactive,
  toRefs,
  onBeforeMount,
  onMounted,
} from "vue";
import LoginForm from "@/views/common/login/loginForm.vue";
export default defineComponent({
  name: "",
  components: { LoginForm },
  setup() {
    //("1-开始创建组件-setup");
    const data = reactive({});
    onBeforeMount(() => {
     // console.log("2.组件挂载页面之前执行----onBeforeMount");
    });
    onMounted(() => {
      ///console.log("3.-组件挂载到页面之后执行-------onMounted");
    });
    const refData = toRefs(data);
    return {
      ...refData,
    };
  },
});
</script>
<style lang="scss" scoped>
.login-container {
  width: 100%;
  height: 100%;
  //background: url("@/assets/images/cat.jpg") no-repeat;
  background-size: 100% 100%;
  .login-logo {
    position: absolute;
    top: 30px;
    left: 50%;
    height: 50px;
    display: flex;
    align-items: center;
    font-size: 20px;
    color: var(--color-primary);
    letter-spacing: 2px;
    width: 90%;
    transform: translateX(-50%);
  }

  .login-content {
    width: 400px;
    padding: 20px;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) translate3d(0, 0, 0);
    background-color: rgba(255, 255, 255, 0.99);
    border: 5px solid var(--color-primary-light-8);
    border-radius: 4px;
    transition: height 0.2s linear;
    height: 380px;
    overflow: hidden;
    z-index: 1;
    .login-content-main {
      margin: 0 auto;
      width: 80%;
      .login-content-title {
        color: #333;
        font-weight: 500;
        font-size: 22px;
        text-align: center;
        letter-spacing: 4px;
        margin: 15px 0 30px;
        white-space: nowrap;
      }
    }
  }
}
</style>
